package com.yedean.mall.controller;

import com.yedean.mall.api.CommonResult;
import com.yedean.mall.dto.PmsProductParam;
import com.yedean.mall.service.IPmsProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 商品管理Controller
 *
 * @author yedean
 * @date 2022/8/16
 */
@RestController
@Api(tags = "商品管理")
@RequestMapping("/admin/product")
public class PmsProductController {

    @Autowired
    private IPmsProductService productService;

    @ApiOperation("创建商品")
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<?> create(@RequestBody PmsProductParam productParam) {
         productService.create(productParam);
         return CommonResult.success();
    }
    
    
    
}
